﻿@using OA.AspNetCore.Html;
@using OA.Model;
@using OA.Model.View;
@using X.PagedList;
@using OA.Core.Helper;
@using OA.Core.Model;

@model Knowledge
@{

    Layout = null;
    string msg = ViewBag.Msg;
    string tips = string.Empty;
    if (!string.IsNullOrWhiteSpace(msg))
    {
        tips = $"layer.msg('{msg}');";
    }
    List<ListItem> selectList = (List<ListItem>)ViewData["selectList"];
}

<div class="myMenu">
    <div class="menu_left"><div class="here w1200"><a href="/Member/Home">首页</a>&nbsp;&gt;&gt;&nbsp;<a href="/Management/Knowledge">知识管理</a>&nbsp;&gt;&gt;&nbsp;编辑通知</div></div>
</div>
<div class="layui-my-content">
    <div class="myForm">
        @using (Html.BeginForm(FormMethod.Post, htmlAttributes: new { @class = "layui-form", id = "myForm" }))
        {
            @Html.AntiForgeryToken()
            <div class="layui-form-item">
                @Html.LabelFor(model => model.Title, new { @class = "layui-form-label" })
                <div class="layui-input-block">
                    @Html.HiddenFor(model => model.ID)
                    @Html.MyEditorFor(model => model.Title)
                </div>
            </div>

            <div class="layui-form-item">
                @Html.LabelFor(model => model.GroupID, new { @class = "layui-form-label" })
                <div class="layui-input-block">
                    @Html.MyEditorFor(model => model.GroupID, selectList)
                </div>
            </div>

            <div class="layui-form-item">
                @Html.LabelFor(model => model.Author, new { @class = "layui-form-label" })
                <div class="layui-input-block">
                    @Html.MyEditorFor(model => model.Author)
                </div>
            </div>

            <div class="layui-form-item">
                @Html.LabelFor(model => model.IsTop, new { @class = "layui-form-label" })
                <div class="layui-input-block">
                    @Html.MyEditorFor(model => model.IsTop)
                </div>
            </div>

            <div class="layui-form-item">
                @Html.LabelFor(model => model.Content, new { @class = "layui-form-label" })
                <div class="layui-input-block">
                    @Html.MyEditorFor(model => model.Content)
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="">立即提交</button>
                </div>
            </div>
        }
    </div>
</div>
<script type="text/javascript">
    layui.use(['form', 'layedit', 'element','layer'], function () {
		form = layui.form;
        layer = layui.layer;
        element = layui.element;
        @Html.Raw(tips)
    });

</script>
